export function calcSystemInfoMenuButtonRectInfo(): SystemInfoMenuButtonRectInfo {
  const systemInfo = wx.getSystemInfoSync();
  console.log("systemInfo", systemInfo);
  const menuButtonRectInfo = wx.getMenuButtonBoundingClientRect();
  console.log("menuButtonRect", menuButtonRectInfo);
  const statusBarHeight = systemInfo.statusBarHeight;
  const menuButtonMarginTop = menuButtonRectInfo.top - statusBarHeight;
  const navBarHeight = menuButtonRectInfo.height + menuButtonMarginTop * 2;
  console.log("statusBarHeight", statusBarHeight);
  const safeArea = systemInfo.safeArea;
  console.log("safeArea", safeArea);
  const topOccupiedHeight = navBarHeight + statusBarHeight;
  return {
    systemInfo,
    menuButtonRectInfo,
    statusBarHeight,
    safeArea,
    navBarHeight,
    topOccupiedHeight,
    leftSafetyAreaWidth: safeArea.left,
    rightSafetyAreaWidth: safeArea.right,
    topSafetyAreaHeight: safeArea.top,
    deviceOrientation: systemInfo.deviceOrientation,
  };
}
